/**
 * Created by Luji on 2017/03/27.
 */

import temp from './user.html';
import ctrl from './user.ctrl.js';



export default angular.module('ctg-k8sconsole')
    .config(['$stateProvider', $stateProvider=> {
        $stateProvider.state('user', {
            url: '/user',
            templateUrl: temp,
            controller: ctrl,
            controllerAs: 'list',
            resolve: {
                list: ['userSrv', 'ctgNotification', function (userSrv, ctgNotification) {
                    return userSrv.getUserList({currentPage: 1}).catch(function (data) {
                        ctgNotification.error('获取用户列表数据有误.');
                    });
                }]
            }
        })
    }]);